Linux

Article Thumbnail
Article

The Eclipse Developer's guide to Clean Code (part 1)

Leo Ufimtsev

"Even bad code can function. But if code isn’t clean, it can bring a development organization to its knees" -- Clean Code We spent 10 times more time reading code than writing it. Thus keeping code clean is essential for maintainability and company growth, but doing it by hand can be tedious. Let's take a look at some of the clean code practices and how we can use Eclipse to re-factor code faster. Change inline comments to sub method calls...

Article Thumbnail
Article

The Eclipse Developer's guide to Clean Code (part 2)

Leo Ufimtsev

Last time we discussed de-duplicating some code. Today let us look into the effectiveness of refactored code, Java 8 support and moving/renaming code. But hold on, aren't method calls expensive? I took a course on compilers in University and did some research on the matter. In 1996 Java in-lining might have made sense. But nowadays the overhead that methods generate is relatively negligible, also the JVM is quite smart in optimizing bytecode by in-lining methods that make sense to in-line...

GNU C library
Article

GCC5 and the C++11 ABI

Jason Merrill

The GNU C++ team works hard to avoid breaking ABI compatibility between releases, including between different -std= modes. But some new complexity requirements in the C++11 standard require ABI changes to several standard library classes to satisfy, most notably to std::basic_string and std::list. And since std::basic_string is used widely, much of the standard library is affected. Many users routinely rebuild all their code when they change compilers; such users will be unaffected by this change. Code built with an earlier...

Article Thumbnail
Article

rebase-helper for RHEL 7

Petr Hracek

What is rebase-helper used for? Rebase-helper automates a lot of manual tasks when a new upstream version of a package is released. How to install rebase-helper on RHEL 7 system? Use this COPR repository where RPM package is already created. http://copr-fe.cloud.fedoraproject.org/coprs/phracek/rebase-helper_EPEL/ Download the repo file and install rebase-helper via yum command. yum install rebase-helper Rebase-helper performs several tasks during the rebase: Downloads an archive with the new sources Tries to apply all downstream patches: If a patch does not apply...

Article Thumbnail
Article

Using Mock to build Python27 Software Collections packages for RHEL6

Tim Bielawa

Have you wanted to use software collections but found packaging has kept you at bay? Tried rebuilding a package only to find it give you weird errors you've not seen before? In this blog post we'll learn how to configure and use mock to build RPM packages for the Python 2.7 Software Collection. Along the way we'll learn why we can't use standard mock configurations, and what makes Software Collections (SCL) mock configurations different. For readers unfamiliar with mock, I'll...

Article Thumbnail
Article

Malloc systemtap probes: an example

Siddhesh Poyarekar

One feedback I got from my blog post on Understanding malloc behavior using Systemtap userspace probes was that I should have included an example script to explain how this works. Well, better late than never, so here's an example script. This script prints some diagnostic information during a program run and also logs some information to print out a summary at the end. I'll go through the script a few related probes at a time. global sbrk, waits, arenalist, mmap_threshold...

PHP logo
Article

Running PHP FPM in Docker

Remi Collet

Use cases In Red Hat Enterprise Linux we support a variety of different versions of PHP. Sometimes users find they need to run a legacy application, requiring an older version of PHP, on a newer version of RHEL. Developers may want to develop an application on their Fedora Workstation and deploy it on a RHEL server or ensure it will be compatible with all available PHP versions in enterprise distributions. This example can be easily adapted for all PHP versions...

Article Thumbnail
Article

The ARM Arc Part 2

Brendan Conoboy

This is a continuation to The ARM Arc Part 1 published in July. It all started in 2012 when the Fedora ARM community decided to move from the legacy ARMv5 software floating point ABI to the new ARMv7 hard float ABI. The move meant better performing code, native atomic operations, threading support, and other modern OS features becoming available to ARM software developers on a general purpose OS. Doing the work required a way to bootstrap a new architecture, which...

Article Thumbnail
Article

Red Hat Developer Newsletter - December 2014

Mike Guerette

Can you believe it's December and almost 2015? Where does the time go? Last month, we shared a Thanksgiving "thank you" for open source. December holidays are commonly about giving, so Red Hat is giving you the opportunity to use containers with the new availability of Red Hat Enterprise Linux® Atomic Beta. This follows the Red Hat Summit 2014 announcement about application containers, including the upstream Project Atomic and our intent to develop a small footprint, container host based on...

GNU C library
Article

Bootstrapping POWER8 little endian and common pitfalls

Aldy Hernandez

Earlier this year I was asked to bootstrap our core tools (compiler, assembler, linker, and libraries) from the ground up, to help the rest of the team in providing enough infrastructure for bootstrapping an entire OS to POWER8 little endian. Since I spend most of my days working on the upstream development of the GNU Compiler Collection (GCC), prior to this project I hadn't actually worked much with either RHEL's development processes or RPM as a whole. So leading our...

RHEL Package
Article

How to package proprietary software

Miroslav Suchý

I like to work with open source code. But it is not always possible. Sometimes you have to deal with proprietary code. And sometimes you have to distribute it. I like to distribute software as RPM package because it allows me to put together patches, post-install scripts and configuration files. But how can I create and distribute proprietary software without violating license? The answer is " nosrc.rpm". For example - let assume that you want to distribute Oracle Database Server...

Python logo
Article

How to add packages to Python 2.7 Software Collection

Bohuslav Kabrda +1

As Software Collections are getting popular, there are more and more people asking how they can build their own collections and/or extend collections in RHSCL. In this article, I will demonstrate how to extend python27 collection from RHSCL 1.2, adding a simple Python extension library. (Note that the same steps can be applied to the python33 collection.) I'm going to work on a RHEL 6 machine throughout this whole tutorial. I'm assuming that readers have basic knowledge of RPM building...

Containers Image
Article

Dockerfiles now available for Red Hat Software Collections

Joe Orton

We recently announced that we've made available a set of Dockerfiles for Red Hat Software Collections. We are making these available since we think they may be useful to customers looking to build more complex application containers on top of RHEL and RHSCL. We don't intend the Dockerfiles to produce useful standalone images which you'll immediately put in production - the Docker images which these create are very simple containers which give you RHEL plus the basic set of packages...

GNU C library
Article

Address and Thread Sanitizers in GCC

Dodji Seketeli

Introduction Since their 4.8 version, the C and C++ compilers of the GNU Co mpiler Collection are equipped with built-in memory and data race errors detectors named Address Sanitizer and Thread Sanitizer. This article intends to quickly walk you through the highlights of these two interesting tools. Spotting common memory access errors ... When instructed to compile a given program, the Address Sanitizer sub-system of GCC emits additional code to instruments the memory accesses performed during the program's execution. Later...

RedHat
Article

November 2014 Developer Newsletter

Mike Guerette

In the United States, we celebrate Thanksgiving on the fourth Thursday of November, which follows our Canadian colleagues who celebrate theirs in October. It's a day for families to get together and give thanks for what we have. Our Red Hat family wants to give thanks for open source, too. Can you imagine an IT world without open source? A number of UNIX businesses would be different. Same with development tools. We have so many scripting languages and other developer...

Red Hat logo
Article

Repost: Red Hat Enterprise Linux 7 Atomic Host Beta - Tell Us What You Think

Mike Guerette

It’s been one week since we announced the beta for Red Hat Enterprise Linux 7 Atomic Host and we’re looking for your feedback. If you’ve downloaded and installed the beta, this is your chance to tell us what you think, and what you’d like to see in the product moving forward. TechValidate is conducting a short, 5-minute survey on behalf of Red Hat. Why should you participate? And there's a $500 prize drawing Provide direct, valuable feedback to Red Hat...

Containers Image
Article

Announcement: Red Hat Enterprise Linux 7 Atomic Host Beta now available

Mike Guerette

At Red Hat Summit 2014, we announced our plans around application containers, including the upstream Project Atomic and our intent to develop a small footprint, container host based on Red Hat Enterprise Linux. Today, we are pleased to announce the availability of the first public beta of Red Hat Enterprise Linux 7 Atomic Host. The beta is available from Red Hat and on Amazon Web Services and Google Compute Platform. Increasingly, business applications are being constructed, not as a monolithic...

Software Collections logo
Article

Red Hat Software Collections 1.2 - now GA

Mike Guerette

Red Hat today announced the general availability of Red Hat Software Collections 1.2, delivering the latest, stable versions of essential development tools, dynamic languages, open source databases, and web servers all on a separate lifecycle from Red Hat Enterprise Linux. The third installment of Red Hat Software Collections now includes vital open developer tools, such as GCC 4.9, Maven and Git, and, for the first time, makes the Eclipse IDE available on Red Hat Enterprise Linux 7. In addition, Red...

GNU C library
Article

Red Hat Enterprise Linux 7 GCC Optimizations - partial inlining indepth

Jeff Law +1

In this prior post we mentioned several new optimization improvements in GCC for Red Hat Enterprise Linux 7. It's time to dig a little deeper. In this post we will focus on partial inlining/function outlining which are part of the Inter-Procedural Analysis (IPA) framework. Function inlining is a well known technique to improve application performance by expanding the body of a called function into one or more of its call site(s). Function inlining decreases function call overhead, may improve icache...

Article Thumbnail
Article

Comparing ABIs for Compatibility with libabigail - Part 2

Dodji Seketeli

In the first article of this series of two, we ran abidiff to compare the ABIs of the libstdc++.so shared libraries from RHEL 6.5 and RHEL 7. In this article, we are going to analyze the resulting ABI change report that was emitted. Analyzing the results The report starts with a header that summarizes the ABI differences: Functions changes summary: 0 Removed, 10 Changed (1260 filtered out), 112 Added functions Variables changes summary: 0 Removed, 3 Changed (72 filtered out)...

Challenges around ABI compatibility
Article

Comparing ABIs for Compatibility with libabigail - Part 1

Dodji Seketeli

Introduction: The challenges around ABI compatibility Ensuring the forward compatibility of application binary interfaces (ABIs) exposed by native shared libraries has been a kind of black art for quite some time, due to many factors. The scope of the term ABI is quite broad, even when it is restricted to shared software libraries. It encompasses low-level concepts like the binary format, the processor instructions set used in the binary, the calling convention of the operating system on a given processor...

NGINX web server image
Article

nginx 1.4 on Red Hat Enterprise Linux 7

Joe Orton

In this post I'm going to talk about using the nginx web server on Red Hat Enterprise Linux 7. nginx 1.4 was added as a "Tech Preview" in the v1.1 release of Red Hat Software Collections. Starting from a freshly kickstarted RHEL7 VM, here's how to get going: [root@virt-el7scratch ~]# subscription-manager repos --enable rhel-server-rhscl-7-rpms Repo 'rhel-server-rhscl-7-rpms' is enabled for this system. This enables the Red Hat Software Collections repository in the yum configuration, which is available with most RHEL entitlements...

Article Thumbnail
Article

Beyond Microbenchmarks: breakthrough container performance with Tesla efficiency

Jeremy Eder

Back story As virtualization was beginning it's march to prominence, we saw a phased approach to adoption. This is common with any sort of game changing technology....let's take electric cars as an example. Early adopters are willing to make certain trade-offs (short range) to gain new capabilities (saving money at the gas station). In the meantime, engineers are off in the lab working hard to increase the possible consumer-base for electric cars by increasing range, decreasing charging cycle times, and...

Article Thumbnail
Article

Intelⓡ Threading Building Blocks in Red Hat Enterprise Linux 7

Matt Newsome +1

That the "free lunch is over" may have become something of a cliche in the IT industry, but the fact is that lately, the increase in cycles per second has been mostly realized by adding more processing units rather than by other techniques. While multiprocessor mainframes and supercomputers existed essentially since the dawn of computing, this may be the first time ever that the only machines without multicore processors may be those in USB fridges and electric toothbrushes. Involute of...